package com.totoro.springboot.kafka_demo.controller;

import com.totoro.springboot.kafka_demo.service.MessageSendService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by Niki on 2018/5/12 10:14
 */
@RestController
public class SendController {
    @Resource
    MessageSendService messageSendService;

    @GetMapping("/send/{topic}/{msg}")
    public String send(@PathVariable String topic, @PathVariable String msg) {
        messageSendService.send(topic,msg);
        return "success";
    }
}
